<?php
namespace app\shop\validate\company;
use think\Validate;
class Train extends Validate
{
    protected $rule = [
        'id' => 'require',
        'file_name' => 'require',
        'file_ids' => 'require',
        'department_id' => 'require',
        'station_id' => 'require',
        'user_id' => 'require',
        'content' => 'require',
        'progress' => 'require',
        'result' => 'require',
    ];
    protected $message = [
        'id.require' => '参数错误',
        'file_ids' => '请上传文件',
        'department_id.require' => '请选择部门',
        'station_id.require' => '请选择岗位',
        'user_id.require' => '请选择员工',
        'content.require' => '请填写培训内容',
        'progress.require' => '请填写培训进度',
        'result.require' => '请填写培训结果',
    ];
    protected $scene = [
        'saveFile' => ['file_ids', 'department_id', 'station_id'],
        'addStudent' => ['user_id'],
        'info' => ['id'],
        'saveLog' => ['user_id', 'content', 'progress', 'result'],
    ];
}